import Vue from 'vue'
import VueRouter from 'vue-router'
const Home = () => import('../views/home/Home')
const Kebao = () => import('../views/Kebao')
const Class = () => import('../views/Class')
const Profile = () => import('../views/Profile')
// 安装vuerouerVue
Vue.use(VueRouter)
// 2创建路由对象
const routes = [
 {
     path:'',
     redirect:'/home'
 },
 {
     path: '/home',
     component:  Home
 },
 {
     path: '/class',
     component:  Class
 },
 {
     path: '/Kebao',
     component:  Kebao
 },
 {
     path: '/profile',
     component:  Profile
 },
     
]
const router = new VueRouter({
    routes,
    mode: 'history'
})
export default router